﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Spire.Xls
{
    class Program
    {
        static void Main(string[] args)
        {
            CreateSpreadsheetWorkbook(@"..\..\Documents\Sheet2.xlsx");
        }
        public static void CreateSpreadsheetWorkbook(string filepath)
        {
            //Initialize a new Workboook object
            Workbook workbook = new Workbook();

            //Specific workbook version
            workbook.Version = ExcelVersion.Version2010;

            //Clear all sheets in workbook
            workbook.Worksheets.Clear();

            //Append a new sheet to worksheet and then name it My Sheet
            workbook.Worksheets.Create("My Sheet");

            //Save workbook to disk
            workbook.SaveToFile(filepath);
        }
    }
}
